package cn.cdl.springcloud.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

import cn.cdl.springcloud.service.HelloService;

@Service("helloService")
public class HelloServiceImpl implements HelloService {

	@Autowired
	RestTemplate restTemplate;
	
	@Override
	public String sayHi(String name) {
		return restTemplate.getForObject("http://service-eureka-client/hi?name="+name, String.class);
	}

	
	
}
